<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
	<ul class="nav nav-tabs">
		<li><a href="{:url('AdminGoodsCategory/index')}">分类显示</a></li>
		<li class="active"><a href="{:url('AdminGoodsCategory/add')}">添加分类</a></li>
	</ul>
	<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('AdminGoodsCategory/addPost')}">

		<div class="form-group">
			<label class="col-sm-2 control-label"><span class="form-required">*</span>分类名称:</label>
			<div class="col-md-6 col-sm-10">
				<input type="text" class="form-control" name="name">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label"><span class="form-required">*</span>上级:</label>
			<div class="col-md-6 col-sm-10">
				<select class="form-control" name="parent_id" id="input-parent">
					<option value="0">作为一级分类</option>
					{$categories_tree}
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">是否显示:</label>
			<div class="col-md-6 col-sm-10">
				<select name="is_show" class="form-control">
					<option value="1">显示</option>
					<option value="0">不显示</option>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">描述</label>
			<div class="col-md-6 col-sm-10">
				<textarea class="form-control" name="cat_desc" id="input-description"></textarea>
			</div>
		</div>

		<div class="form-group">
			<label for="js-thumbnail-input" class="col-sm-2 control-label">分类图片</label>
			<div class="col-md-6 col-sm-10">
				<input type="hidden" name="cat_img" class="form-control"
					   id="js-thumbnail-input">
				<div>
					<a href="javascript:uploadOneImage('图片上传','#js-thumbnail-input');">
						<img src="__TMPL__/public/assets/images/default-thumbnail.png"
							 id="js-thumbnail-input-preview"
							 width="135" style="cursor: pointer"/>
					</a>
				</div>
			</div>
		</div>

		<div class="col-sm-offset-2 col-sm-10">
			<button type="submit" class="btn btn-primary js-ajax-submit">{:lang("SAVE")}</button>
			<a class="btn btn-default" href="__URL__">返回</a>
		</div>
	</form>

</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>